/*
 *  GWGlitchParameters.h
 *  GWGlitch
 *
 *  Created by Michael Forrest on 01/03/2008.
 *  Copyright 2008 Grimaceworks. All rights reserved.
 *
 */

#define PARAM_INFO(name, unit, minValue, maxValue, defaultValue, flags) {\
name, NULL, 0, CFSTR(name), unit, minValue, maxValue, defaultValue, flags\
}


#pragma mark ____GWGlitch Parameters

static AudioUnitParameterInfo Selected_Effect_info 
= PARAM_INFO(  "Selected effect", 
             kAudioUnitParameterUnit_LinearGain,
             0,    //min
             6, //max
             0,  //default
             0// flags
             );
// Turntable Stop
static AudioUnitParameterInfo Turntable_Friction_info
= PARAM_INFO(  "Turntable friction",
             kAudioUnitParameterUnit_Percent,
             1, //min
             100, //max
             50, // def
             0 // flags
             );

// RING MOD: pitch
static AudioUnitParameterInfo RingMod_Pitch_info
= PARAM_INFO(  "Ringmod pitch",
             kAudioUnitParameterUnit_Cents, // I'll set a default and offset from there. easier than absolute
             -240, //min
             240, //max
             0, // def
             0 // flags
             );


// GATER: threshold, decay
static AudioUnitParameterInfo Gater_Threshold_info
= PARAM_INFO(  "Gater threshold",
             kAudioUnitParameterUnit_Decibels,
             0.001, //min
             1.0, //max
             0.1, // def
             kAudioUnitParameterFlag_DisplayLogarithmic // flags
             );
static AudioUnitParameterInfo Gater_Decay_info
= PARAM_INFO(  "Gater decay",
             kAudioUnitParameterUnit_Milliseconds,
             20, //min
             1000, //max
             20, // def
             0 // flags
             );

// DELAY
static AudioUnitParameterInfo Delay_Pitch_info
= PARAM_INFO(  "Delay pitch",
             kAudioUnitParameterUnit_MIDINoteNumber,
             30, //min
             96, //max
             84, // def
             0 // flags
             );
			 
static AudioUnitParameterInfo Delay_Feedback_info
= PARAM_INFO(  "Delay feedback",
             kAudioUnitParameterUnit_Percent,
             0.0, //min
             100.0, //max
             80.0, // def
             0 // flags
             );
// REVERSER
static AudioUnitParameterInfo Reverser_Beat_Number_info
= PARAM_INFO(  "Reverser beats",
             kAudioUnitParameterUnit_Beats,
             0.25, //min
             16, //max
             1, // def
             0 // flags
             );
// BIT REDUX
static AudioUnitParameterInfo Bit_Redux_Bitrate_info
= PARAM_INFO(  "Bit redux bitrate ",
             kAudioUnitParameterUnit_Generic,
             1, //min
             16, //max
             8, // def
             0 // flags
             );

static AudioUnitParameterInfo* gGlitchParameters[] = {
    &Selected_Effect_info,
	&Turntable_Friction_info,
	&RingMod_Pitch_info,
	&Gater_Threshold_info,
	&Gater_Decay_info,
	&Delay_Pitch_info,
	&Delay_Feedback_info,
	&Reverser_Beat_Number_info,
	&Bit_Redux_Bitrate_info
};

enum {
    kParam_SelectedEffect = 0,
	kParam_TurntableFriction,
	kParam_RingModPitch,
	kParam_GaterThreshold,
	kParam_GaterDecay,
	kParam_DelayPitch,
	kParam_DelayFeedback,
	kParam_ReverserBeats,
	kParam_BitReduxBits,
    kNumParameters
};
